chore: improve Claude Code config and docs#2585
Conversation
|
Visual regression report✅ No changes.
Baselines come from the |
a842707 to
05d09a8
Compare
| ## Finding component info | ||
|
|
||
| ## Quick Start | ||
| 1. **Start with the component README**: `/packages/<pkg>/src/<Component>/README.md` — this is the source for the published docs and has examples + prop descriptions. |
There was a problem hiding this comment.
I would add a sentence about multi version support explaining what v1 v2 means for example.
There was a problem hiding this comment.
Good call — added a short "Component versioning (v1/v2)" section explaining v1 = legacy, v2 = preferred. Thanks! 🙏
| InstUI uses custom markdown with special code blocks (using [gray-matter](https://github.com/jonschlinkert/gray-matter) YAML syntax) for interactive examples. | ||
|
|
||
| **Code block types:** | ||
|
|
There was a problem hiding this comment.
I would keep this info so Claude understands the docs structure.
There was a problem hiding this comment.
Fair — inlined a brief summary of the code/embed/example block types right in CLAUDE.md (kept the link to writing-docs.md for the full reference). Thanks!
- Rewrite CLAUDE.md as a minimal, non-derivable reference (~45 lines, down from 200+). - Tighten /commit and /pr slash commands: pin gh to --body-file -, drop CI-covered items from test plan, note commitlint's 100-char body line limit. - Add .claude/settings.json with a read-only safe-command allowlist (git/pnpm/gh/file-search). - Ignore CLAUDE.local.md for personal overrides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
05d09a8 to
d3d60a6
Compare
|
|
||
| All PRs must include: | ||
| 1. `git status` — confirm branch + remote tracking. | ||
| 2. `git log master..HEAD` and `git diff master...HEAD` — review **all** commits in the branch, not just the latest. |
There was a problem hiding this comment.
Why should the AI review commits when pushing?
| ## Steps | ||
|
|
||
| All PRs must include: | ||
| 1. `git status` — confirm branch + remote tracking. |
There was a problem hiding this comment.
I would also add here, that it should abort if its on the master branch or its in a branch that has no commits.
|
|
||
| Co-Authored-By: Claude <noreply@anthropic.com> | ||
| ``` | ||
| 1. `git status` + `git diff` (and `git diff --staged` if anything's staged). |
There was a problem hiding this comment.
I'd add that it should not commit if its on the master branch
| # Instructure UI | ||
|
|
||
| ## Project Overview | ||
| React component library and design system. Lerna 8 + pnpm monorepo, ~100 packages under `/packages/ui-*`. |
There was a problem hiding this comment.
we're using Lerna 9 now... I think that the version here is irrelevant
| Always include: | ||
| - **type**: one of `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`. `commitlint.config.js` extends [`@commitlint/config-conventional`](https://www.npmjs.com/package/@commitlint/config-conventional), which defines the allowed set — pick the type that genuinely matches the change (`feat`/`fix` only for actual features/bug fixes). | ||
| - **scope**: full package name (`ui-button`, `ui-select`). Comma-separate for a few, use `many` for several, omit for repo-wide. | ||
| - **subject**: imperative ("add loading state", not "added"). No trailing period. |
There was a problem hiding this comment.
- must start with a lowercase letter.
| 2. **Test Plan**: Clear steps for reviewers to test the changes | ||
| 3. **Jira Reference**: Include relevant Jira ticket number if applicable (e.g., `Fixes INST-1234`) | ||
| 4. **AI Disclosure**: Must clearly indicate this was created with AI assistance | ||
| If the branch name or any commit references a Jira ticket (e.g. `INSTUI-1234`), include it. If you can't find one, ask the user once before opening — don't invent one. |
There was a problem hiding this comment.
I'd also write that the JIRA ticket number should be included in the PR title, e.g. INSTUI-1234 Fix Button border sizing
Summary
CLAUDE.mdas a minimal, non-derivable reference (~45 lines, from 200+); drop dead path topackages/__docs__/src/components.tsand content Claude can infer from the code./commitand/prslash commands: pinghto--body-file -, exclude CI-covered items from the test plan, drop duplicated breaking-change rules..claude/settings.jsonwith a read-only/safe-command allowlist so commonpnpm/git/gh/file-search commands stop prompting.CLAUDE.local.mdso devs can keep personal overrides uncommitted.Test Plan
Fixes INSTUI-5060
🤖 Generated with Claude Code